<?php
$str = "I just want to walch mevie with my friand";
$s1 = str_replace( ['walch', 'mevie', 'friand'], ['watch', 'movie', 'friend'], $str );

/*echo ucwords($s1);*/
$str2 = 'FunCTION_deFINe_TYpe';
$newStr2 = strtolower( $str2 );
$newStr2 = ucwords( str_replace( '_', ' ', $newStr2 ) );
$newStr3 = str_replace( ' ', '_', $newStr2 );
echo $newStr3;